#!/usr/bin/python

def leer_workspace():
	f = open("../CONFIG", "r")
	l = f.readline() 
	linea = l.split(' ')
	if linea[0]=='WORKSPACE':
		f.close()
		return linea[2]

def leer_bbdd():
	f = open("../CONFIG", "r")
	linea=True
	resul={}
	i=0
	l = f.readline() 
	while linea:
		l = f.readline()
		if not l:
			linea=False
		else:
			li = l.split(' ')
			if li[0]=='HOST' or li[0]=='USER' or li[0]=='PASS' or li[0]=='BBDD':
				resul[i]=li[2]
				i=i+1
	f.close()
	return resul

def leer_resources():
	f = open("../CONFIG", "r")
	l = f.readline()
	while l:
		linea = l.split(' ')
		if linea[0] == 'RESOURCES':
			return linea[2]
		l = f.readline()
	print "No resources"

